import api from './index'
// axios
import request from '@/utils/request'
// home api


// 获取导航栏栏目数据
export function getColumn(params) {
  return request({
    url: api.getColumn,
    method: 'get',
    params
  })
}

// 获取公告列表
export function getBulletinList(params) {
  return request({
    url: api.BulletinList,
    method: 'get',
    params
  })
}


// 获取轮播数据
export function getBannerList(params) {
  return request({
    url: api.BannerList,
    method: 'get',
    params
  })
}


// 获取微信公众号js签名
export function GetJsapi(params) {
  return request({
    url: api.GetJsapi,
    method: 'get',
    params
  })
}

// 首页顶部栏目
export function GetHomePageTop(params) {
  return request({
    url: api.homepageTop,
    method: 'get',
    params
  })
}


// 首页栏目接口
export function GetModuleCategoryList(params) {
  return request({
    url: api.moduleCategoryList,
    method: 'get',
    params
  })
}

export function setFinalOpration(params) {
  return request({
    url: api.setFinalOpration,
    method: 'get',
    params
  })
}


// 获取平台规则详情
export function GetRuleDetail(params) {
  return request({
    url: api.GetRuleDetail,
    method: 'get',
    params
  })
}

//活动日历首页判断跳转方式
export function getEventLinkType(params) {
  return request({
    url: api.getEventLinkType,
    method: 'get',
    params
  })
}


//收藏日历活动
export function getEventCollection(params) {
  return request({
    url: api.getEventCollection,
    method: 'post',
    params
  })
}

//日历活动收藏列表
export function getMyEventCollection(params) {
  return request({
    url: api.getMyEventCollection,
    method: 'get',
    params
  })
}

//取消收藏日历活动
export function getEventCancelCollection(params) {
  return request({
    url: api.getEventCancelCollection,
    method: 'post',
    params
  })
}

//个人中心模块
export function getmoduleCategoryList(params) {
  return request({
    url: api.getmoduleCategoryList,
    method: 'get',
    params
  })
}
//商户列表
export function getNearbyShops(params) {
  return request({
    url: api.getNearbyShops,
    method: 'get',
    params
  })
}
//店铺详情
export function getShopsDetails(params) {
  return request({
    url: api.getShopsDetails,
    method: 'get',
    params
  })
}
//我的订单列表
export function getOrderList(params) {
  return request({
    url: api.getOrderList,
    method: 'get',
    params
  })
}
//我的收藏
export function collectList(params) {
  return request({
    url: api.collectList,
    method: 'get',
    params
  })
}
//申请退款
export function getReturnOrder(params) {
  return request({
    url: api.getReturnOrder,
    method: 'get',
    params
  })
}
//我的订单-取消订单
export function postCancelOrder(data) {
  return request({
    url: api.postCancelOrder,
    method: 'post',
    data
  })
}
//收藏商铺
export function postAddOrDelete(data) {
  return request({
    url: api.postAddOrDelete,
    method: 'post',
    data
  })
}
//门店用户反馈信息
export function postAddFeedback(data) {
  return request({
    url: api.postAddFeedback,
    method: 'post',
    data
  })
}
//提交订单2
export function submitOrder(data) {
  return request({
    url: api.submitOrder,
    method: 'post',
    data
  })
}
//获取自己数据信息
export function getUserInfo(params) {
  return request({
    url: api.getUserInfo,
    method: 'get',
    params
  })
}
//个人中心我的收藏
export function getColShopsImg(params) {
  return request({
    url: api.getColShopsImg,
    method: 'get',
    params
  })
}
//
export function getRuleDetail(params) {
  return request({
    url: api.getRuleDetail,
    method: 'get',
    params
  })
}
//活动规则
export function getDetail(params) {
  console.log(params)
  return request({
    url: api.getDetail+'?goodsId='+params.goodsId+'&location='+params.location,
    method: 'get'
  })
}
//卡券订单支付
export function postPrepay(data) {
  return request({
    url: api.postPrepay,
    method: 'post',
    data
  })
}
//获取订单来源
export function info(params) {
  return request({
    url: api.info,
    method: 'get',
    params
  })
}
//订单详情
export function getOrderDetail(params) {
  return request({
    url: api.getOrderDetail,
    method: 'get',
    params
  })
}
//上传用户头像、姓名
export function postSetUserInfo(params) {
  return request({
    url: api.postSetUserInfo,
    method: 'get',
    params
  })
}
//购买商品列表
export function goodsdplist(params) {
  console.log(params)
  return request({
    url: api.goodsdplist,
    method: 'get'
  })
}
//购买商品详情
export function goodsdetail(params) {
  console.log(params)
  return request({
    url: api.goodsdetail,
    method: 'get',
    params
  })
}
//店铺网点查询
export function getNearbySpBc(params) {
  console.log(params)
  return request({
    url: api.getNearbySpBc,
    method: 'get',
    params
  })
}
